package com.abocode.aichat.server.modules.protocol.handler;

import com.abocode.aichat.server.channel.ChannelWrapper;
import com.abocode.aichat.server.context.ServerRuntimeContext;
import com.abocode.aichat.server.modules.ModuleHandler;
import com.abocode.aichat.server.reply.Replies;
import com.abocode.aichat.server.stanza.Stanza;
import com.abocode.aichat.server.channel.ChannelWrapper;
import com.abocode.aichat.server.context.ServerRuntimeContext;
import com.abocode.aichat.server.reply.Replies;
import com.abocode.aichat.server.stanza.Stanza;

/**
 * Created by franky.
 */
public class PresenceOnlineHandler implements ModuleHandler {
    @Override
    public Replies execute(ChannelWrapper channelWrapper, Stanza stanza, ServerRuntimeContext serverRuntimeContext) {
        serverRuntimeContext.getProtocolChannelRegistry().presence(channelWrapper.getEntity());
        return null;
    }

    @Override
    public String module() {
        return "online";
    }
}
